home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / infor / pbhype.zip / 100WAYS next >
Text File  |  1993-02-05  |  18KB  |  391 lines

  1.  PBHYPE.ZIP 
  2.  100WAYS
  3.  
  4.                 100 ways PowerBASIC 3.0 beats QuickBasic
  5.                 ========================================
  6.  
  7.    1- PB3 directly creates TSR (terminate/stay-resident) programs which can
  8.       "pop-down" to a memory image of 4K!  Memory resident programs can be
  9.       activated by practically any stimulus:  a hot key, timer, inactivity,
  10.       a hardware or software interrupt, even a message from a foreground
  11.       program.  In fact, it's possible for multiple TSRs to activate each
  12.       other repeatedly, with two-way communication throughout.  No other
  13.       language offers this capability as an integral part of the compiler.
  14.  
  15.    2- PB3 uses all real mode memory for dynamic strings.  It's the first
  16.       and only Basic with a no-limit, handle-based string memory manager;
  17.       QB is limited to substantially less than 64k, and PDS has "inside"
  18.       segmentation limits (<64k per module, per sub-program, etc.)
  19.  
  20.    3- The PB3 String Memory Manager is a resource available to any user
  21.       code.  Both Basic and Assembler code can allocate, release, and alter
  22.       memory blocks as required by the programmer.  While other compilers
  23.       may allow you to calcluate string location or assignment, none allow
  24.       the full memory management functionality of PowerBASIC.
  25.  
  26.    4- PB3 compiles to true machine code in the integrated environment; the
  27.       identical code as an .EXE file.  You never need to deal with a slow,
  28.       p-code interpreter as in QB and PDS.  That means faster development,
  29.       and the elimination of subtle differences between interpreted and
  30.       compiled results.
  31.  
  32.    5- PB3 offers unsigned integer variable types: BYTE, WORD, DOUBLE WORD.
  33.       (byte: 0-255   word: 0-65,535   dword: 0-4,294,967,295).  Unsigned
  34.       integers are not available in other Basic compilers.
  35.  
  36.    6- Optionally, PB3 can require that all variables be declared before use;
  37.       this option greatly enhances the probability of catching "typos"
  38.       automatically during compilation.
  39.  
  40.    7- Dual Monitor Support is offered in both the PowerBASIC Integrated
  41.       Environment and the PBD Standalone debugger.  This allows the
  42.       programmer to simultaneously view a full screen of source code and
  43.       debug information alongside a second full screen generated by the
  44.       target program.  Annoying screen flashes and pauses are eliminated.
  45.  
  46.    8- PowerBASIC is DesqView aware.
  47.  
  48.    9- As an enhancement to user-defined TYPES, PowerBASIC is the first Basic
  49.       compiler to offer user-defined UNIONS as well.
  50.  
  51.   10- PB3 offers 64-bit signed integer variables types.  Quad-word integers
  52.       are not available in other Basic compilers.
  53.  
  54.   11= With PowerBASIC, there is no need to maintain numerous sets of
  55.       libraries.  Other compilers require one set of run time libraries for
  56.       near strings, another for far strings, and still another for each of
  57.       the floating point options.  Then you need Quick Libraries for work
  58.       in the IDE, but Link Libraries to create an .EXE.  With PowerBASIC,
  59.       there's no more confusion:  All run time libraries are built into
  60.       the compiler, and PB3 selects them automatically!  Furthermore, the
  61.       built-in PowerBASIC linker recognizes the same object modules, units,
  62.       and libraries, whether you're running in the IDE or creating an .EXE.
  63.  
  64.   12- PB3 offers a USING$ function, which may be referenced in any string
  65.       expression.  It duplicates the numeric and text formatting capability
  66.       of PRINT USING, but allows the result to be saved or modified, rather
  67.       than require immediate printing.
  68.  
  69.   13- PB3 offers extended precision (80-bit) floating point variable types.
  70.  
  71.   14- The PRINT USING and USING$ functions in PB3 may be dynamically altered
  72.       to format numeric values with leading zeros, or other special
  73.       characters.  Further, currency characters ("$,.") may be easily
  74.       adapted to non-USA standards when needed.
  75.  
  76.   15- PB3 offers conditional compilation directives ($IF/$ELSE/$ENDIF) to
  77.       allow easy version control, as well as large comment blocks in your
  78.       source code.
  79.  
  80.   16- PB3 supports HUGE arrays (total data size > 64k) on a selective basis.
  81.       Unlike other Basic compilers, the extra overhead of huge array
  82.       calculation is only applied to those arrays which require it.
  83.  
  84.   17- PB3 supports fixed-point BCD variable type with variable precision
  85.       from 0-18 digits, not a forced 4 digits which introduces additional
  86.       round-off errors.
  87.  
  88.   18- PB3 supports floating point BCD variable type.
  89.  
  90.   19- PB3 offers built-in array manipulation functions:  ARRAY SORT,
  91.       ARRAY SCAN, ARRAY INSERT, and ARRAY DELETE.
  92.  
  93.   20- PB3 offers a full-functioned, built-in assembler.  Critical sections
  94.       of a program can easily be hand-optimized to provide the utmost
  95.       performance, as Assembler and Basic can be intermixed line-by-line.
  96.  
  97.   21- PB3 won't run out of memory compiling the largest programs.  It
  98.       automatically uses EMS, XMS, and VMS virtual disk memory.
  99.  
  100.   22- User-defined TYPE arrays need not be a power of two in element
  101.       size in order to exceed 128k of data space.
  102.  
  103.   23- The PB3 program editor offers the capability to read and write
  104.       blocks of text to external disk files.
  105.  
  106.   24- PB3 supports source-level metastatements for all compilation
  107.       switches.
  108.  
  109.   25- VIEW TEXT supports scrollable rectangular text view ports.
  110.  
  111.   26- PEEK and POKE extensions support byte, integer, and long integer.
  112.  
  113.   27- PEEK$ and POKE$ extensions support memory block moves or assignment.
  114.  
  115.   28- FLUSH will force all buffered data to be written to a disk file,
  116.       while minimizing the overhead of a file close and re-open.
  117.  
  118.   29- PowerBASIC offers MIN and MAX functions which allow a variable
  119.       number of arguments:  PRINT MIN(a%,b%,c%,d%)
  120.  
  121.   30- BIT operations include shift, rotate, set, reset, toggle, test.
  122.  
  123.   31- BIT arrays up to 512k bits are implicitly supported.
  124.  
  125.   32- CHR$ allows a variable number of arguments.  CRLF$ = chr$(13,10)
  126.  
  127.   33- Optional procedural math package offers faster calculation
  128.       (improvement of 40% to 500%) when no numeric co-processor is
  129.       installed.  Procedural math package uses the 8087 if it is
  130.       available, and can toggle between the emulator/procedural option
  131.       on a statement-by-statement basis for the highest optimization.
  132.       Procedural package adheres to IEEE floating-point standard.
  133.  
  134.   34- Flex string variable type offers fixed-length strings which may
  135.       be sized dynamically at run-time.
  136.  
  137.   35- MAP statement allows flex scalar and array variables to be
  138.       linked together into dynamic data structures, with nesting
  139.       capabilities limited only by available memory.  These data
  140.       structures are created and sized dynamically at the time of
  141.       program execution to offer dynamic data base capabilities.
  142.  
  143.   36- Many string and numeric functions offer the ANY option, such
  144.       as INSTR("abcde", ANY "cq") returns 3.
  145.  
  146.   37- EXTRACT$ captures that portion of a string up to a sub-string.
  147.  
  148.   38- REPEAT$ creates a string from a repetition of another string.
  149.  
  150.   39- REPLACE substitutes one sub-string for all occurrences of another.
  151.  
  152.   40- REMOVE$ removes all occurrences of a sub-string.
  153.  
  154.   41- VERIFY ascertains that all characters in one string also occur
  155.       in a second string.
  156.  
  157.   42- TALLY counts the occurrences of a sub-string.
  158.  
  159.   43- LTRIM$/RTRIM$ strip leading/trailing spaces or other characters.
  160.  
  161.   44- STR$(x,y) function specifies y significant decimal digits.
  162.  
  163.   45- ROUND(x,y) rounds off x to y digits past the decimal point.
  164.  
  165.   46- STRPTR/STRSEG return the address of any string variable data.
  166.       Dynamic, Flex, and Fixed-length strings are supported as both
  167.       scalars and arrays.
  168.  
  169.   47- END statement may return an optional error level.
  170.  
  171.   48- ASCII functions avoids error conditions of ASC function, by
  172.       returning -1 if the argument is a zero-length string.
  173.  
  174.   49- Integer divide, MOD, AND, OR, XOR, EQV, and IMP are valid
  175.       on all numeric values in the range of a quad-word (64-bit)
  176.       integer (+/- 2^63-1).
  177.  
  178.   50- PB3 optionally generates 80286/80386 specific code.
  179.  
  180.   51- Library stripping for ambiguous library functions is controlled
  181.       directly by meta-statements or menu choices, rather than the
  182.       necessity of complex linker commands.
  183.  
  184.   52- Separate compilation via unit modules is simpler, faster, and
  185.       offers standard PUBLIC/EXTERNAL statements.
  186.  
  187.   53- Assembler object modules may be linked via $LINK meta-statements.
  188.  
  189.   54- Executable files are generated directly rather than complex
  190.       shells to a compiler and linker, resulting in faster compilation.
  191.  
  192.   55- A full complement of error checks can easily enabled or
  193.       disabled, including STACK, NUMERIC, OVERFLOW, and BOUNDS.
  194.  
  195.   56- The PowerBasic editor doesn't alter capitalization or spacing,
  196.       and doesn't insert or remove code from the source program.
  197.  
  198.   57- Line continuation characters are supported inside and ouside of
  199.       the IDE.
  200.  
  201.   58- Identical code, just as efficient, is generated when error
  202.       trapping is enabled.  Other compilers generate larger, slower
  203.       code whenever a program includes an ON ERROR GOTO clause.  This
  204.       is a serious factor often overlooked in published benchmarks.
  205.  
  206.   59- PowerBasic supports a single-line if/then/else statement which
  207.       is 100% compatible with BASICA/GW-BASIC.  Other Basics force this
  208.       code to be re-written.
  209.  
  210.   60- PowerBasic performs short-circuit expression evaluation in
  211.       boolean expressions.
  212.  
  213.   61- Interpreted print: the user chooses graphic character or
  214.       interpreted actions for special ascii characters.
  215.  
  216.   62- MTIMER function provides microtimer accuracy.
  217.  
  218.   63- INSTAT function tests for a keypress without removing it from
  219.       the keyboard buffer.
  220.  
  221.   64- INCR and DECR statements are offered for all numeric data types.
  222.  
  223.   65- Forward references to DEF FN, SUB, and FUNCTION are allowed.
  224.  
  225.   66- $SEGMENT allows multiple segments of module level code within
  226.       the same source file.  There is no requirement to split your
  227.       program into multiple modules as your program size increases.
  228.  
  229.   67- EXP2, EXP10, LOG2 and LOG10 are supported.
  230.  
  231.   68- CEIL function returns the smallest integer greater or equal to n.
  232.  
  233.   69- CALL INTERRUPT is built right into the PowerBASIC language.  There's
  234.       no need to load a special library in order to access this capability.
  235.  
  236.   70- FRAC function returns the fractional part of n.
  237.  
  238.   71- FIX function returns the whole number part of n.
  239.  
  240.   72- ISTRUE and ISFALSE Boolean operators force true and false values
  241.       to -1 and 0 respectively.
  242.  
  243.   73- ITERATE forces a new iteration of a loop.
  244.  
  245.   74- PB3 offers absolute arrays at any specific memory location.
  246.  
  247.   75- EXIT FAR provides a controlled, multi-level SUB/FUNCTION
  248.       exit - a safe, yet powerful enhancement to the SETJMP and
  249.       LONGJMP functions found in C compilers.  This allows you to
  250.       exit a SUB/FUNCTION, and immediately branch to the label most
  251.       recently specified as an EXIT FAR destination in any "parent"
  252.       procedure with any number of intervening procedure calls.  All
  253.       temporaries and local variables are released as necessary, so
  254.       this is readily usable for special exception-processing.  EXIT
  255.       FAR constructs may be nested to any level.
  256.  
  257.   76- CODEPTR and CODESEG functions allow you to obtain the offset
  258.       and Segment of any SUB, FUNCTION, or LABEL in the program.
  259.       This capability, unavailable in other Basics, is essential
  260.       for interrupt handlers and certain other assembler code.
  261.  
  262.   77- A standalone debugger (PBD.EXE) is included with PowerBASIC 3.0.
  263.  
  264.   78- The PB3 Librarian (PBLIB.EXE) constructs libraries which may
  265.       include both industry-standard object modules (.obj), as well as
  266.       highly efficient binary unit modules (.pbu) constructed by the
  267.       PowerBASIC compiler.
  268.  
  269.   79- Internal assembler code can access all PowerBASIC variables (even
  270.       local and static variables), as well as subs, functions, and labels.
  271.  
  272.   80- $ALIAS metastatement allows the name of the main data segment to be
  273.       redefined for external object modules.
  274.  
  275.   81- BITS function allows fast, one-step conversion between signed and
  276.       unsigned representations of a numeric value.
  277.  
  278.   82- Internal procedures ARRAYCALC and ARRAYINFO are provided so that
  279.       assembler code can manipulate all aspects of PowerBASIC arrays.
  280.  
  281.   83- PowerBASIC offers the option to preserve or discard the GOSUB stack
  282.       at the current SUB/FUNCTION level in case of a trapped error.  If
  283.       the choice is to discard it, substantially more efficient code can
  284.       be generated.
  285.  
  286.   84- PowerBASIC functions can be called just as if they were a SUB, and
  287.       the returned result is discarded.
  288.  
  289.   85- CLS statement offers options to clear the text viewport, the graphics
  290.       viewport, the key line, or the entire screen.
  291.  
  292.   86- ERRTEST function returns the current error number, while resetting it
  293.       to zero for future calls.  This provides an efficient means of error
  294.       polling when using ON ERROR RESUME NEXT to mask system errors.
  295.  
  296.   87- FILEATTR function can optionally return the open/closed status of a
  297.       particular file number, as well as the record length of a random file.
  298.  
  299.   88- KEY statement now offers an optional third parameter which allows the
  300.       programmer to define any shift keys which should be ignored in
  301.       determining if ON KEY GOSUB should be called.  With other Basics,
  302.       it's necessary to declare numerous key statements to cover every
  303.       possible combination of shift keys., or else an errant "caps lock"
  304.       or "num lock" key can cause a defined hot-key to be ignored.
  305.  
  306.   89- NAME statement allows renaming of directories as well as files.
  307.  
  308.   90- Serial communication is supported at baud rates up to 115200.  Other
  309.       Basics are limited to 9600.
  310.  
  311.   91- DIR$ function allows you to read directory items with any attribute,
  312.       not just normal files:  sub-directories, volumes, hidden/system files.
  313.  
  314.   92- OPEN COM supports the DT option which causes DTR to be asserted after
  315.       the communications file is closed.
  316.  
  317.   93- PowerBASIC supports direct access to COM3 and COM4.
  318.  
  319.   94- OPTION BINARY BASE allows the programmer to choose binary file access
  320.       based at zero or one, depending upon the program logic.
  321.  
  322.   95- PowerBASIC provides documented Basic and Assembler access to numerous
  323.       internal system variables.  This provides easy access to the cpu type,
  324.       co-processor type, cursor shape and visibility, PB revision, screen
  325.       page and attributes, video card, print using format characters,
  326.       screen/viewport size, and much more.
  327.  
  328.   96- BIN$ function returns the binary representation of a number.
  329.  
  330.   97- GET$ statement reads a binary file, assigning a specified number of
  331.       bytes to a string variable.
  332.  
  333.   98- PUT$ statement writes a string expression to a binary file.
  334.  
  335.   99- DELAY statement pauses program execution for n seconds without the
  336.       possibility of interrupt by a keystroke.
  337.  
  338.  100- While PowerBASIC offers a large superset of the functionality found
  339.       in other compilers, moving up to PowerBASIC 3.0 couldn't be easier!
  340.       PB3 is 99+% compatible with QuickBasic syntax, and our Programmer's
  341.       Guide devotes a chapter to the minor differences which remain.
  342.  
  343.  
  344.                 PowerBASIC . . . it's not your basic BASIC!
  345.  
  346.  
  347.  
  348.                         Check List
  349.                         ==========
  350.  
  351. Feature                                        PB 3.0  QB 4.5  PDS 7.1  VBDOS
  352. =======                                        ======  ======  =======  =====
  353.  
  354. TSR programming support built-in                  X
  355. Internal Assembler in the language                X
  356. Option to require variable declaration            X                      X
  357. Unsigned byte, word, dword integer variables      X
  358. User-Defined TYPES                                X       X       X      X
  359. User-Defined UNIONS                               X
  360. User-Defined Dynamic Data Structures (MAPS)       X
  361. Array sort, scan, insert, delete statement        X
  362. Pointers to a sub, function, or label             X
  363. EXIT FAR multi-level sub/function exit            X
  364. Unlimited dynamic string space <1>                X
  365. ON LOCAL ERROR                                    X               X      X
  366. Standalone debugger included                      X               X      X
  367. Editor never changes your source programs         X
  368. Conditional compilation ($IF/$ELSE/$ENDIF)        X
  369. Viewport for screen text display                  X                      X
  370. Alternate procedural math package                 X               X      X
  371. Procedural math package utilizes 8087             X
  372. Extended 80-bit floats & 64-bit integers          X
  373. Floating point BCD variables                      X
  374. Fixed point BCD variables  <2>                    X               X      X
  375. Block memory moves with PEEK$/POKE$               X
  376.  
  377.  
  378. <1> PowerBASIC can allocate all real mode memory for any and all dynamic
  379.     strings.  There are no "inside limits" (such as 64k limit per module
  380.     or sub-program) as are found in far string implementations.
  381.  
  382. <2> PowerBASIC Fixed-Point BCD variables are implemented as 64-bit scaled
  383.     integers for computational efficiency.  The decimal digits (to the right
  384.     of the decimal point) may be user-defined from 0 to 18.  Some Microsoft
  385.     products offer a currency data type, which is fixed at 4 decimal places.
  386.     Even though the internal format is identical to that of PowerBASIC,
  387.     additional round-off code is typically required in financial calculations
  388.     to correct the precision to standard dollars/cents levels.  Since this
  389.     binary-coded-decimal format differs from traditional "natural bcd",
  390.     Microsoft contends that their products do not support BCD variables.
  391.